<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://www.itaoke.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author:  Caption <Caption@163.com> QQ 1674653
// +----------------------------------------------------------------------

// 检测PHP环境
if(version_compare(PHP_VERSION,'5.3.0','<'))  die('require PHP > 5.3.0 !');

// 检查是否已安装
if (!is_file('./data/install.lock')) {
	header('Location: ./install.php');
	exit;
}

// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',true);

// 定义应用目录
define('APP_PATH','./App/');
require("./data/config/version.php");
require("./data/config/debug.php");

define('TMPL_PATH','./Tpl/');
define('ITK_DATA_PATH', './data/');
define('CONF_PATH',		ITK_DATA_PATH . 'config/');
define('RUNTIME_PATH',	ITK_DATA_PATH . 'runtime/');
define('HTML_PATH',		ITK_DATA_PATH . 'html/');

//psr4自动加载
require  './vendor/autoload.php';

// 引入ThinkPHP入口文件
require './Core/ThinkPHP.php';